#ifndef TOKEN_H
#define TOKEN_H

#include <string>
#include <iostream>

// Token types for C language
enum class TokenType {
    // Keywords
    INT, CHAR, FLOAT, DOUBLE, VOID, IF, ELSE, WHILE, FOR, RETURN, 
    BREAK, CONTINUE, STRUCT, TYPEDEF, CONST, STATIC, EXTERN,
    
    // Operators
    PLUS, MINUS, MULTIPLY, DIVIDE, MODULO,
    ASSIGN, EQUAL, NOT_EQUAL, LESS, LESS_EQUAL, GREATER, GREATER_EQUAL,
    AND, OR, NOT, INCREMENT, DECREMENT,
    
    // Delimiters
    SEMICOLON, COMMA, DOT, ARROW,
    LEFT_PAREN, RIGHT_PAREN,
    LEFT_BRACKET, RIGHT_BRACKET,
    LEFT_BRACE, RIGHT_BRACE,
    
    // Literals
    INTEGER_LITERAL, FLOAT_LITERAL, CHAR_LITERAL, STRING_LITERAL,
    IDENTIFIER,
    
    // Special
    END_OF_FILE, UNKNOWN
};

class Token {
public:
    TokenType type;
    std::string value;
    int line;
    int column;
    
    Token(TokenType type, const std::string& value, int line, int column)
        : type(type), value(value), line(line), column(column) {}
    
    std::string toString() const;
};

#endif
